package org.example.system.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
import org.example.system.common.base.BaseEntity;

/**
 * 订单表
 * @TableName biz_order
 */
@TableName(value ="biz_order")
@Data
public class BizOrder extends BaseEntity implements Serializable {
    /**
     * 订单ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单号(如：17301911391102)
     */
    @TableField(value = "out_trade_no")
    private String outTradeNo;

    /**
     * 租户ID(外键)
     */
    @TableField(value = "tenant_id")
    private Integer tenantId;

    /**
     * 车辆ID(外键)
     */
    @TableField(value = "vehicle_id")
    private Integer vehicleId;

    /**
     * 用车车型（如：大众捷达VS7）
     */
    @TableField(value = "model_name")
    private String modelName;

    /**
     *  微信openid
     */
    @TableField(value = "open_id")
    private String openid;

    /**
     * 取车网点
     */
    @TableField(value = "pickup_location")
    private String pickupLocation;

    /**
     * 还车网点
     */
    @TableField(value = "drop_off_location")
    private String dropOffLocation;

    /**
     * 取车时间
     */
    @TableField(value = "pickup_time")
    private LocalDateTime pickupTime;

    /**
     * 还车时间(为null表示未还车)
     */
    @TableField(value = "drop_off_time")
    private LocalDateTime dropOffTime;

    /**
     * 租车天数
     */
    @TableField(value = "total_day")
    private Integer totalDay;

    /**
     * 取消时间
     */
    @TableField(value = "cancel_time")
    private LocalDateTime cancelTime;

    /**
     * 订单金额
     */
    @TableField(value = "total_fee")
    private BigDecimal totalFee;

    /**
     * 订单状态(0:待支付 1:待取车 2：用车中，3：已还车 4：已取消)
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 订单备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 车型id(外键)
     */
    @TableField(value = "model_id")
    private Integer modelId;

    /**
     * 网点id(外键)
     */
    @TableField(value = "shop_id")
    private Integer shopTd;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}